Roughly speaking, templates cannot be instantiated using types that are local to a function.
The fact you are mixing C techniques with C++ techniques will make your code very error prone. Even if the compiler doesn't complain, it is a very poor idea to use an array of char as keys for a map. It's akin to the argument of having to use strcmp() function to compare strings in C, rather than the == operator.
So I suggest looking up and using the std::string class (which is in the C++ header named <string>, not <string.h>) as the key for your map. And eliminate the usage of headers <stdio.h>, <stdlib.h>, and <string.h>.
I'm not suggesting C techniques are bad. However, they generally do not play well with techniques used in C++.